package com.ywk.base.javaBase.ioStream;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;


public class FileReaderClass {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		 FileReader fr = null;
		 int c = 0;
		 int i = 0;
			try {
				fr = new FileReader("E:/代码编程。。。。/Java/my app/ew/mydir1/mydir2/hw.java");
				while((c = fr.read()) != -1){
					System.out.print((char)c);
					i++;
					if(i>=33){
						System.out.println();
						i=0;
					}
				}
				fr.close();
			} catch (FileNotFoundException e) {
				System.out.println("找不到文件");
			}catch (IOException e) {
				System.out.println("文件读取错误");
			}
	}

}
